package com.dhsc.local.dao.impl.ywjk.qywjh.jhlxwh;

import com.dhsc.domain.jkzx.ywjk.qywjh.jhlxwh.TjkYclbVo;
import com.dhsc.domain.jkzx.ywjk.qywjh.jhlxwh.TjkYclbYclxVo;
import com.dhsc.domain.jkzx.ywjk.qywjh.jhmxxx.TjkYclxVo;
import com.dhsc.local.dao.ywjk.qywjh.jhlxwh.ILxflcsDao;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository("lxflcsdao")
public class LxflcsDaoImpl implements ILxflcsDao {


    @Autowired
    private SqlSessionTemplate localSqlSessionTemplate;

    @Override
    public List<TjkYclbVo> queryLxflcs() {
        return localSqlSessionTemplate.selectList("LxflcsMapper.queryLxflcs");
    }

    @Override
    public List<TjkYclxVo> queryLxflcsYclx() {
        return localSqlSessionTemplate.selectList("LxflcsMapper.queryLxflcsYclx");
    }

    @Override
    public int querySjkYclbBh() {
        return localSqlSessionTemplate.selectOne("LxflcsMapper.querySjkYclbBh");
    }

    @Override
    public int saveYclb(TjkYclbVo tjkYclbVo) {
        return localSqlSessionTemplate.insert("LxflcsMapper.saveYclb",tjkYclbVo);
    }

    @Override
    public int queryYclbExist(TjkYclbVo tjkYclbVo) {
        return localSqlSessionTemplate.selectOne("LxflcsMapper.queryYclbExist",tjkYclbVo);
    }

    @Override
    public int updateYclb(TjkYclbVo tjkYclbVo) {
        return localSqlSessionTemplate.update("LxflcsMapper.updateYclb",tjkYclbVo);
    }

    @Override
    public int deleteYclb(Integer bh) {
        return localSqlSessionTemplate.delete("LxflcsMapper.deleteYclb",bh);
    }

    @Override
    public int saveYclbYclx(List<TjkYclbYclxVo> list) {
        return localSqlSessionTemplate.insert("LxflcsMapper.saveYclbYclx",list);
    }

    @Override
    public int delYclbYclx(Integer bh) {
        return localSqlSessionTemplate.delete("LxflcsMapper.delYclbYclx",bh);
    }
}
